<template>
  <div class="ke-mine-tab">
    <ul>
      <li>
        <router-link :to="'/mine/timetable'" tag="div">课程表</router-link>
      </li>
      <li>
        <router-link :to="'/mine/order'" tag="div">全部订单</router-link>
      </li>
      <li>
        <router-link :to="'/mine/collect'" tag="div">收藏</router-link>
      </li>
      <li>
        <router-link :to="'/mine/userinfo'" tag="div">个人信息</router-link>
      </li>
      <li v-show="isTeacher">
        <router-link :to="'/mine/applycourse'" tag="div">上传课程</router-link>
      </li>
      <li v-show="isTeacher">
        <router-link :to="'/mine/mineUpload'" tag="div">已上传课程</router-link>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'ke-mine-tab',
  data() {
    return {

    }
  },
  computed: {
    isTeacher() {
      return localStorage.getItem('ke_identity') === 'teacher'
    }
  }
}
</script>

<style lang="stylus" scoped>
.ke-mine-tab {
  ul {
    padding: 0;
    width: 200px;
    background-color: #ffffff;
    border: 1px solid #dddddd;

    li {
      list-style: none;
      line-height: 45px;
      height: 45px;
      box-sizing: border-box;
      text-indent: 20px;
      cursor: pointer;

      &:hover {
        background-color: #dddddd;
        color #23b8ff
      }
    }
  }
}
</style>
